#ifndef GKO_POOL_INCLUDE_HASH_GP_MD5_H
#define GKO_POOL_INCLUDE_HASH_GP_MD5_H

#include <cstring>

struct md5_context
{
    unsigned long total[2];
    unsigned long state[4];
    unsigned char buffer[64];

    unsigned char ipad[64];
    unsigned char opad[64];
};

#ifdef __cplusplus
extern "C" {
#endif // cpp extern c

void md5_starts(md5_context* ctx);

void md5_update(md5_context* ctx, const unsigned char* input, size_t ilen);

void md5_finish(md5_context* ctx, unsigned char output[16]);

void md5(const unsigned char* input, size_t ilen, unsigned char output[16]);

int md5_file(const char* path, unsigned char output[16]);

void md5_hmac_starts(md5_context* ctx, const unsigned char* key, size_t keylen);

void md5_hmac_update(md5_context* ctx, const unsigned char* input, size_t ilen);

void md5_hmac_finish(md5_context* ctx, unsigned char output[16]);

void md5_hmac_reset(md5_context* ctx);

void md5_hmac(const unsigned char* key, size_t keylen,
              const unsigned char* input, size_t ilen,
              unsigned char output[16]);

int md5_self_test(int verbose);

#ifdef __cplusplus
}
#endif // cpp extern c

#endif // header file protect
// END: CODEREVIEW: